/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-07 09:26:03
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-05-14 10:36:28
 * @FilePath: /yt-devops/lib/model/device_product_type_model.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:native_dart_package/generated/base/json_field.dart';
part 'device_product_type_model.g.dart';

@JsonSerializable()
class DeviceProductTypeModel {
  int? id; //单元id
  String? name; //设备(产品)类型
  String? description;

  int? subsystemId;
  String? config;

  DeviceProductTypeModel(
      {this.id, this.name, this.description, this.subsystemId, this.config});

  factory DeviceProductTypeModel.fromJson(Map<String, dynamic> json) =>
      _$DeviceProductTypeModelFromJson(json);

  Map<String, dynamic> toJson() => _$DeviceProductTypeModelToJson(this);

  @override
  bool operator ==(Object other) {
    if (other is DeviceProductTypeModel) {
      return other.id == id;
    }
    return false;
  }

  @override
  int get hashCode => super.hashCode;
}
